function Person() {
    this.name = 'icoder'
    this.age = 18
    // 设置了属性访问函数  降低了执行效率
    this.getAge = function() {
        return this.age
    }
}

const p1 = new Person()
const a = p1.getAge()

function Person() {
    this.name = 'icoder'
    this.age = 18
}

const p2 = new Person()
constb = p2.age